import request from "@/utils/request";
export const uploadImageOrfile = (file) => {
    const formData = new FormData();
    formData.append("file", file);
    return request.post("files/upload", formData, {
      headers: {
        "Content-Type": "multipart/form-data"
      }
    });
};
export const downloadFile = (data) =>
  request.post("files/download", data, {
    responseType: "blob"  // 告诉 axios 这是一个二进制流
  });

export const deleteFile = (data) => request.post("files/delete", data);